package StudyCode.summary.Basic.myrandom;

import java.util.Random;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingRandomClass {
	public static void main(String[] args) {
		Random random = new Random();

		int myInt = random.nextInt();
		System.out.println("Random int: " + myInt);
		double myDouble = random.nextDouble();
		System.out.println("Random double: " + myDouble);

		float myFloat = random.nextFloat();
		System.out.println("Random float: " + myFloat);

		// mean 0.0 and standard deviation 1.0
		double gausDouble = random.nextGaussian();
		System.out.println("Random Gaussian double: " + gausDouble);
		long myLong = random.nextLong();
		System.out.println("Random long: " + myLong);
		boolean myBoolean = random.nextBoolean();
		System.out.println("Random boolean: " + myBoolean);
	}
}
